package weixintozfbrouter

import (
	"github.com/gin-gonic/gin"
	weixin "yundian/internel/app/handlers/pcl/zmsc/zmwxapplet"
	"yundian/internel/app/middlewares"
	"yundian/internel/pkg/dingo"
)

func InitServiceRouter() dingo.ApiRouter {
	return func(g *gin.RouterGroup) {
		{
			r := g.Group("wx")
			r.Use(middlewares.JwtZfbAuthMiddleware)

			r.POST("automate/get-goods-list", weixin.HandleGetAutomateGoodsList)         // 查询售货机商品
			r.POST("automate/create-goods-order", weixin.HandleAutomateCreateGoodsOrder) // 创建售货机订单
			r.POST("automate/shipping-advice", weixin.HandleShippingAdvice)              // 售货机出货通知
			r.POST("automate/get-order-list", weixin.HandleGetAutomateOrderList)         // 查询售货机订单

			r.POST("get-room-type-list", weixin.HandleGetRoomTypeList)                    // 查询房间类型
			r.POST("get-room-type-info", weixin.HandleGetRoomTypeInfo)                    // 查询当前设备房间类型
			r.POST("create-room-order", weixin.HandleCreateRoomOrder)                     // 创建续住订单
			r.POST("create-below-line-room-order", weixin.HandleCreateBelowLineRoomOrder) // 创建续住订单-线下支付
			r.POST("get-room-order-Details", weixin.HandleGetRoomOrderDetails)            // 查询续住订单详情

			r.POST("get-goods-type", weixin.HandleGetGoodsTypeList)                 // 查询商品类型
			r.POST("get-goods-list", weixin.HandleGetGoodsList)                     // 查询商品列表
			r.POST("get-draw-goods-list", weixin.HandleGetDrawGoodsList)            // 查询商品列表 盲盒抽奖商品
			r.POST("get-draw-goods-prize-list", weixin.HandleGetDrawGoodsPrizeList) // 查询盲盒中奖商品

			r.POST("create-goods-order", weixin.HandleCreateGoodsOrder) // 创建商品订单
			r.POST("again-goods-order", weixin.HandleAgainGoodsOrder)   // 重新支付订单
			r.POST("cancel-goods-order", weixin.HandleCancelGoodsOrder) // 取消订单

			r.POST("get-goods-orders", weixin.HandleGetGoodsOrderList)           // 查询商品订单
			r.POST("get-goods-order-details", weixin.HandleGetGoodsOrderDetails) // 查询商品订单详情

			r.POST("get-goods-buy-cart-list", weixin.HandleGetGoodsBuyCartList) // 购物车-查询列表
			r.POST("set-goods-buy-cart", weixin.HandleSetGoodsBuyCart)          // 购物车-新增/更新
			r.POST("delete-goods-buy-cart", weixin.HandleDeleteGoodsBuyCart)    // 购物车-删除商品
			r.POST("empty-goods-buy-cart", weixin.HandleEmptyGoodsBuyCart)      // 购物车-清空

			r.POST("get-home-bulletin-list", weixin.HandleGetStewardHomeBulletinList) // 首页公告-有效时间内
			r.POST("get-all-bulletin-list", weixin.HandleGetStewardAllBulletinList)   // 公告列表

			//r.POST("get-receive-coupon-list", weixin.HandleGetStewardCouponList) // 查询可领取充电优惠券
			//r.POST("receive-coupon", weixin.HandleStewardReceiveCoupon)          // 领取优惠券
			//r.POST("get-use-coupon-list", weixin.HandleGetStewardUseCouponList)  // 查询会员可用优惠券
			r.POST("get-use-charge-coupon-list", weixin.HandleGetStewardUseChargeCouponList) // 查询会员充电可用优惠券
		}
	}
}
